<script>
import NavBasic from "@/components/NavBasic.vue";

export default {
  name:'Home',
  components: { NavBasic},
  data(){
    return{
    }
  },
  methods:{
  },
  beforeRouteEnter(to,from,next){
    console.log('独享路由守卫介入')
    console.log(from.path)
    if (to.path!==from.path){
       next()
    }else{
      console.log(to.path)
    }
  }
}

</script>

<template>
  <el-container>
    <el-header>layout模板
    </el-header>
    <el-container>
      <el-aside style="width:200px">
        <nav-basic></nav-basic>
      </el-aside>
      <el-main>
        <keep-alive>
          <router-view>
          </router-view>
        </keep-alive>
      </el-main>
    </el-container>
  </el-container>
</template>

<style scoped>
.el-header, .el-footer {
  background-color: #B3C0D1;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  background-color: #D3DCE6;
  color: #333;
  text-align: center;
  overflow: hidden;
}

.el-main {
  background-color: #E9EEF3;
  color: #333;
  text-align: center;
  padding: 0;
}

body > .el-container {
  height:100%;
  width:100%;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}
.is-vertical{
  height:100%;
  width:100%;
}
</style>
